#pragma once

#include<iostream>
#include<string>
#include<map>
#include<assert.h>
using namespace std;

template<class T>
class SmartPtr{
public:
	SmartPtr( T*&& ptr)
	:_ptr(ptr)
	{}

	~SmartPtr()
	{
		cout << "delete:" << _ptr << endl;

		delete _ptr;
	}

	T& operator*()
	{
		return *_ptr;
	}

	T* operator->()
	{
		return _ptr;
	}

private:
	T* _ptr;
};